import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';

class Error {

  BuildContext? context;

  static Error of(BuildContext context){
    Error error = Error();
    error.context = context;
    return error;
  }

  void show(String text){
    BrnToast.show(text??'', context!,
        gravity: BrnToastGravity.center,
        preIcon: const Image(
            image: AssetImage('assets/image/error.png'),
            width: 20,
            height: 20));
  }
}